package com.chentf;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;

/**
 * @author chentengfei
 * @desc ...
 * @date 2021-09-20 19:49:43
 */
@SpringBootApplication
@EnableDiscoveryClient
public class GatewayApplication {

    private static final Logger log = LoggerFactory.getLogger(GatewayApplication.class);

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(GatewayApplication.class, args);
        ConfigurableEnvironment environment = run.getEnvironment();
        log.info("端口号:{},项目名称:{}",environment.getProperty("server.port"),environment.getProperty("spring.application.name"));
    }
}
